package com.maikang.exammall.service;

import com.maikang.exammall.entity.Region;
import com.maikang.exammall.repository.RegionRepository;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;

import java.util.List;


@Log4j2
@Service
public class RegionService extends BaseService<Region, Long, RegionRepository> {

    public List<Region> findByParentId(Long parentId) {
        return repository.findByParentId(parentId);
    }

    public List<Region> findByLevel(Integer level) {
        return repository.findByLevel(level);
    }
}
